home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 5817 / 5817.xpi / chrome / content / sqlitemanager.xul < prev    next >
Encoding:
Extensible Markup Language  |  2010-02-11  |  36.5 KB  |  640 lines

  1. <?xml version="1.0"?>
  2.  
  3. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  4. <?xml-stylesheet href="chrome://sqlitemanager/skin/sqlitemanager.css" type="text/css"?>
  5. <?xml-stylesheet href="chrome://sqlitemanager/skin/dynaTreeDataTable.css" type="text/css"?>
  6.  
  7. <?xul-overlay href="chrome://sqlitemanager/content/menuSqlHelper.xul"?>
  8. <?xul-overlay href="chrome://sqlitemanager/content/tabDbInfo.xul"?>
  9. <?xul-overlay href="chrome://sqlitemanager/content/exim.xul"?>
  10. <?xul-overlay href="chrome://sqlitemanager/content/udf.xul"?>
  11.  
  12. <!DOCTYPE window SYSTEM "chrome://sqlitemanager/locale/sqlitemanager.dtd">
  13.  
  14. <window id="sqlitemanager-window" title="&window.title;"
  15.  persist="screenX screenY width height sizemode"
  16.  orient="vertical"
  17.  onload="SQLiteManager.Startup()"
  18.  onunload="SQLiteManager.Shutdown()"
  19.  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  20.  xmlns:html="http://www.w3.org/1999/xhtml">
  21.  
  22.   <!-- Icon from chrome -->
  23. <!-- without div, there is error -->
  24.   <html:div>
  25.     <html:link rel="icon" href="chrome://sqlitemanager/skin/images/default16.png"/>
  26.   </html:div>
  27.  
  28.   <script type="application/x-javascript" src="globals.js"/>
  29.   <script type="application/x-javascript" src="tokenize.js"/>
  30.   <script type="application/x-javascript" src="treeDataTable.js"/>
  31.   <script type="application/x-javascript" src="treeDbStructure.js"/>
  32.   <script type="application/x-javascript" src="exim.js"/>
  33.   <script type="application/x-javascript" src="udf.js"/>
  34.   <script type="application/x-javascript" src="createManager.js"/>
  35.   <script type="application/x-javascript" src="sqlitemanager.js"/>
  36.   <script type="application/x-javascript" src="extManager.js"/>
  37.  
  38.   <commandset id="sm-cmdset">
  39.     <command id="smc-newDb" oncommand="SQLiteManager.newDatabase()" tooltiptext="&menu.db.new;"/>
  40.     <command id="smc-openDb" oncommand="SQLiteManager.openDatabase()" tooltiptext="&menu.db.connect;"/>
  41.     <command id="smc-import" oncommand="SQLiteManager.importFromFile()" tooltiptext="&import;" observes="bc-dbOpen"/>
  42.     <command id="smc-udf" oncommand="SQLiteManager.openUdfTab()" tooltiptext="User-defined functions"/>
  43.  
  44.     <!-- commands for tables -->
  45.     <command id="smc-createTable" oncommand="SQLiteManager.createTable()" tooltiptext="&createTable;" observes="bc-dbOpen"/>
  46.     <command id="smc-dropTable" oncommand="SQLiteManager.operateOnTable('drop')" tooltiptext="&dropTable;" observes="bc-dbOpen"/>
  47.     <command id="smc-modifyTable" hidden="true" oncommand="SQLiteManager.operateOnTable('modify')" tooltiptext="&modifyTable;" observes="bc-dbOpen"/>
  48.     <command id="smc-emptyTable" oncommand="SQLiteManager.operateOnTable('empty')" tooltiptext="&emptyTable;" observes="bc-dbOpen"/>
  49.     <command id="smc-renameTable" oncommand="SQLiteManager.operateOnTable('rename')" tooltiptext="&renameTable;" observes="bc-dbOpen"/>
  50.     <command id="smc-copyTable" oncommand="SQLiteManager.operateOnTable('copy')" tooltiptext="©Table;" observes="bc-dbOpen"/>
  51.     <command id="smc-exportTable" oncommand="SQLiteManager.exportObject('table')" tooltiptext="&exportTable;" observes="bc-dbOpen"/>
  52.     <command id="smc-reindexTable" oncommand="SQLiteManager.operateOnTable('reindex')" tooltiptext="&reindexTable;" observes="bc-dbOpen"/>
  53.  
  54.     <!-- commands for views -->
  55.     <command id="smc-createView" oncommand="SQLiteManager.createObject('view')" tooltiptext="&createView;" observes="bc-dbOpen"/>
  56.     <command id="smc-dropView" oncommand="SQLiteManager.dropObject('view')" tooltiptext="&dropView;" observes="bc-dbOpen"/>
  57.     <command id="smc-renameView" oncommand="SQLiteManager.renameObject('view')" tooltiptext="&renameView;" observes="bc-dbOpen"/>
  58.     <command id="smc-modifyView" oncommand="SQLiteManager.modifyView()"  tooltiptext="&modifyView;" observes="bc-dbOpen"/>
  59.     <command id="smc-exportView" oncommand="SQLiteManager.exportObject('view')" tooltiptext="&exportView;" observes="bc-dbOpen"/>
  60.  
  61.     <!-- commands for indexes -->
  62.     <command id="smc-createIndex" oncommand="SQLiteManager.createObject('index')" tooltiptext="&createIndex;" observes="bc-dbOpen"/>
  63.     <command id="smc-dropIndex" oncommand="SQLiteManager.dropObject('index')" tooltiptext="&dropIndex;" observes="bc-dbOpen"/>
  64.     <command id="smc-reindexIndex" oncommand="SQLiteManager.reindexIndex()" tooltiptext="&reindexIndex;" observes="bc-dbOpen"/>
  65.  
  66.     <!-- commands for triggers -->
  67.     <command id="smc-createTrigger" oncommand="SQLiteManager.createObject('trigger')" tooltiptext="&createTrigger;" observes="bc-dbOpen"/>
  68.     <command id="smc-dropTrigger" oncommand="SQLiteManager.dropObject('trigger')" tooltiptext="&dropTrigger;" observes="bc-dbOpen"/>
  69.     <command id="smc-renameTrigger" oncommand="SQLiteManager.renameObject('trigger')" tooltiptext="&renameTrigger;" observes="bc-dbOpen"/>
  70.  
  71.     <!-- commands for search -->
  72.     <command id="smc-search" oncommand="SQLiteManager.search()" tooltiptext="&btn.search;" label="&btn.search;" accesskey="&btn.search.ak;" observes="bc-dbOpen"/>
  73.     <command id="smc-showAll" oncommand="SQLiteManager.showAll()" tooltiptext="&btn.showAll;" label="&btn.showAll;" accesskey="&btn.showAll.ak;" observes="bc-dbOpen"/>
  74.  
  75.     <command id="smc-refresh" oncommand="SQLiteManager.refresh()" tooltiptext="&refreshDirection;" observes="bc-dbOpen"/>
  76.     <command id="smc-options" oncommand="SQLiteManager.openOptionsWindow()" tooltiptext="&mi.options;" accesskey="&mi.options.ak;"/>
  77.     <command id="smc-dominspector" oncommand="SQLiteManager.openDomIWindow()" tooltiptext="Start DOM Inpector"/>
  78.     <command id="smc-aboutconfig" oncommand="SQLiteManager.openAboutConfigWindow()" tooltiptext="&mi.aboutconfig;" accesskey="&mi.aboutconfig.ak;"/>
  79.     <command id="smc-console" oncommand="SQLiteManager.openConsoleWindow()" tooltiptext="&mi.console;" accesskey="&mi.console.ak;"/>
  80.     <command id="smc-selectAllRecords" oncommand="SQLiteManager.selectAllRecords()" tooltiptext="&selectAllRecords;" label="&selectAllRecords;" accesskey="&selectAllRecords.ak;" observes="bc-dbOpen"/>
  81.  
  82.     <!-- for commands under execute tab-->
  83.     <command id="smc-runQuery" oncommand="SQLiteManager.runSqlStatement('select')" />
  84.   </commandset>
  85.  
  86.   <keyset id="smKeyset">
  87.     <key id="refresh-key" modifiers="shift" keycode="VK_F5" command="smc-refresh"/>
  88.     <key id="key-selectAllRecords" modifiers="accel shift" key="A" command="smc-selectAllRecords"/>
  89.     <key id="key-runQuery" modifiers="accel" key=";" command="smc-runQuery"/>
  90.     <key modifiers="control" keycode="VK_F12" command="smc-runQuery"/>
  91.   </keyset>
  92.  
  93.   <!-- hidden because it occupies some space in Songbird -->
  94.   <broadcasterset hidden="true">
  95.     <broadcast id="bc-dbOpen" disabled="true"/>
  96.   </broadcasterset>
  97.  
  98.   <popupset>
  99.     <menupopup id="mp-opTableColumn">
  100.       <menuitem label="&menu.editColumn;" accesskey="&menu.editColumn.ak;" oncommand="SQLiteManager.startEditColumn()"/>
  101.       <menuitem label="&menu.dropColumn;" accesskey="&menu.dropColumn.ak;" oncommand="SQLiteManager.dropColumn()"/>
  102.     </menupopup>
  103.  
  104.     <!-- context menu for tree columns in treeDataTable -->
  105.     <menupopup id="mp-data-treecol">
  106.       <menuitem label="&menu.copyColName;" accesskey="&menu.copyColName.ak;" oncommand="SQLiteManager.copyColumnName(this)"/>
  107.     </menupopup>
  108.  
  109.     <!-- context menu for tree in execute tab -->
  110.     <menupopup id="mp-copy">
  111.       <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeExecute.UserCopyRows('csv')"/>
  112.       <menuitem label="&menu.copyRowsForExcel;" oncommand="treeExecute.UserCopyRows('csv-excel')"/>
  113.       <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeExecute.UserCopyRows('sql')"/>
  114.       <menuseparator/>
  115.       <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeExecute.UserCopyCell()"/>
  116.     </menupopup>
  117.  
  118.     <!-- context menu for tree in browse tab for master tables & views -->
  119.     <menupopup id="mp-browse-copy">
  120.       <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeBrowse.UserCopyRows('csv')"/>
  121.       <menuitem label="&menu.copyRowsForExcel;" oncommand="treeBrowse.UserCopyRows('csv-excel')"/>
  122.       <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeBrowse.UserCopyRows('sql')"/>
  123.       <menuseparator/>
  124.       <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeBrowse.UserCopyCell()"/>
  125.     </menupopup>
  126.   
  127.     <!-- context menu for tree in browse tab for other tables -->
  128.     <menupopup id="mp-editTableRow">
  129.       <menuitem label="&menu.editSelected;" accesskey="&menu.editSelected.ak;" oncommand="SQLiteManager.operateOnTable('update')"/>
  130.       <menuitem label="&menu.deleteSelected;" accesskey="&menu.deleteSelected.ak;" oncommand="SQLiteManager.operateOnTable('delete')"/>
  131.       <menuitem label="&menu.duplicateRecord;" accesskey="&menu.duplicateRecord.ak;" oncommand="SQLiteManager.operateOnTable('duplicate')"/>
  132.       <menuseparator/>
  133.       <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeBrowse.UserCopyRows('csv')"/>
  134.       <menuitem label="&menu.copyRowsForExcel;" oncommand="treeBrowse.UserCopyRows('csv-excel')"/>
  135.       <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeBrowse.UserCopyRows('sql')"/>
  136.       <menuseparator/>
  137.       <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeBrowse.UserCopyCell()"/>
  138.     </menupopup>
  139.  
  140.     <menupopup id="mp-create-table">
  141.       <menuitem label="&createTable;" accesskey="&create.ak;" command="smc-createTable"/>
  142.     </menupopup>
  143.     <menupopup id="mp-create-index">
  144.       <menuitem label="&createIndex;" accesskey="&create.ak;" command="smc-createIndex"/>
  145.     </menupopup>
  146.     <menupopup id="mp-create-view">
  147.       <menuitem label="&createView;" accesskey="&create.ak;" command="smc-createView"/>
  148.     </menupopup>
  149.     <menupopup id="mp-create-trigger">
  150.       <menuitem label="&createTrigger;"  accesskey="&create.ak;" command="smc-createTrigger"/>
  151.     </menupopup>
  152.  
  153.     <menupopup id="mp-dbstructure" onpopupshowing="SQLiteManager.setTreeStructureContextMenu();">
  154.     </menupopup>
  155.  
  156.     <menupopup id="mp-detachDb">
  157.       <menuitem label="&menu.db.detach;" oncommand="SQLiteManager.detachDatabase()"/>
  158.     </menupopup>
  159.   </popupset>
  160.  
  161.   <vbox id="hello" flex="1">
  162.     <toolbox id="tb-main">
  163.       <menubar id="sm-menubar">
  164.         <menu id="menu-database" label="&menu.db;" accesskey="&menu.db.ak;">
  165.           <menupopup>
  166.             <menuitem label="&menu.db.new;" accesskey="&menu.db.new.ak;" command="smc-newDb"/>
  167.             <menuitem label="&menu.db.newMemory;" accesskey="&menu.db.newMemory.ak;" oncommand="SQLiteManager.openMemoryDatabase()"/>
  168.             <menuitem label="&menu.db.connect;" accesskey="&menu.db.connect.ak;" command="smc-openDb"/>
  169.             <menuitem id="mi-connect-ads-win" hidden="true" label="&menu.db.connectADS;" oncommand="SQLiteManager.openDatabaseADS()"/>
  170.             <menuitem label="&menu.db.close;" accesskey="&menu.db.close.ak;" oncommand="SQLiteManager.closeDatabase()" observes="bc-dbOpen"/>  
  171.             <menu label="&menu.db.mru;" id="menu-mru"  accesskey="&menu.db.mru.ak;">
  172.               <menupopup>
  173.               </menupopup>
  174.             </menu>
  175.             <menuseparator/>
  176.             <menuitem label="&menu.db.attach;" accesskey="&menu.db.attach.ak;" oncommand="SQLiteManager.attachDatabase()" observes="bc-dbOpen"/>
  177.             <menuitem label="&menu.db.detach;" accesskey="&menu.db.detach.ak;" oncommand="SQLiteManager.detachDatabase()" observes="bc-dbOpen"/>
  178.             <menuseparator/>
  179.             <menuitem label="&menu.db.copy;" accesskey="&menu.db.copy.ak;" oncommand="SQLiteManager.copyDatabase()" observes="bc-dbOpen"/>  
  180.             <menuitem label="&menu.db.compact;" accesskey="&menu.db.compact.ak;" oncommand="SQLiteManager.compactDatabase()" observes="bc-dbOpen"/>  
  181.             <menuitem label="&menu.db.analyze;" accesskey="&menu.db.analyze.ak;" oncommand="SQLiteManager.analyzeDatabase()" observes="bc-dbOpen"/>  
  182.             <menuitem label="&menu.db.check;" accesskey="&menu.db.check.ak;" oncommand="SQLiteManager.checkIntegrity()" observes="bc-dbOpen"/>  
  183.             <menuseparator/>
  184.             <menuitem label="&exportAll;" accesskey="&exportAll.ak;" oncommand="SQLiteManager.exportAll('tables')" observes="bc-dbOpen"/>  
  185.             <menuitem label="&exportDb;" accesskey="&exportDb.ak;" oncommand="SQLiteManager.exportAll('db')" observes="bc-dbOpen"/>  
  186.             <menuitem label="&exportDbStr;" accesskey="&exportDbStr.ak;" oncommand="SQLiteManager.exportAll('dbstructure')" observes="bc-dbOpen"/>  
  187.             <menuitem label="&import;" accesskey="&import.ak;" command="smc-import"/>  
  188.             <menuseparator/>
  189.             <menuitem  label="&refresh;" accesskey="&refresh.ak;" command="smc-refresh" key="refresh-key"/>  
  190.             <menuitem label="&reconnect;" accesskey="&reconnect.ak;" oncommand="SQLiteManager.reconnect()" observes="bc-dbOpen"/>  
  191. <!--
  192.             <menuitem label="Save Database" accesskey="s" disabled="true"/>  
  193. -->
  194.             <menuseparator/>
  195.             <menuitem label="&exit;" accesskey="&exit.ak;" oncommand="window.close()"/>
  196.           </menupopup>
  197.         </menu>
  198.         <!-- menupopups in the next 4 menus have been reused using javascript createMenu function-->
  199.         <menu id="menu-table" label="&menu.table;" accesskey="&menu.table.ak;">
  200.           <menupopup>
  201.             <menuitem label="&createTable;" accesskey="&create.ak;" command="smc-createTable"/>
  202.             <menuitem label="&dropTable;" accesskey="&drop.ak;" command="smc-dropTable"/>
  203.             <menuitem label="&emptyTable;" accesskey="&empty.ak;" command="smc-emptyTable"/>
  204.             <menuseparator/>
  205.             <menuitem label="&renameTable;" accesskey="&rename.ak;" command="smc-renameTable"/>
  206.             <menuitem label="&modifyTable;" accesskey="&modify.ak;" command="smc-modifyTable"/>
  207.             <menuitem label="©Table;" accesskey="©.ak;" command="smc-copyTable"/>
  208.             <menuitem label="&exportTable;" accesskey="&export.ak;" command="smc-exportTable"/>
  209.             <menuseparator/>
  210.             <menuitem label="&reindexTable;"  accesskey="&reindex.ak;" command="smc-reindexTable"/>
  211.             <!-- some error: says unknown collation -->
  212.             <!--
  213.             <menuitem label="&analyzeTable;" accesskey="&analyze.ak;" oncommand="SQLiteManager.operateOnTable('analyze')"/>
  214.             -->
  215.           </menupopup>
  216.         </menu> 
  217.         <menu id="menu-index" label="&menu.index;" accesskey="&menu.index.ak;"> 
  218.           <menupopup>
  219.             <menuitem label="&createIndex;" accesskey="&create.ak;" command="smc-createIndex"/>
  220.             <menuitem label="&dropIndex;" accesskey="&drop.ak;" command="smc-dropIndex"/>
  221.             <menuseparator/>
  222.             <menuitem label="&reindexIndex;" accesskey="&reindex.ak;" command="smc-reindexIndex"/>
  223.           </menupopup>
  224.         </menu> 
  225.         <menu id="menu-view" label="&menu.view;" accesskey="&menu.view.ak;">
  226.           <menupopup>
  227.             <menuitem label="&createView;" accesskey="&create.ak;" command="smc-createView"/>
  228.             <menuitem label="&dropView;" accesskey="&drop.ak;" command="smc-dropView"/>
  229.             <menuseparator/>
  230.             <menuitem label="&renameView;" accesskey="&rename.ak;" command="smc-renameView"/>
  231.             <menuitem label="&modifyView;" accesskey="&modify.ak;" command="smc-modifyView"/>
  232.             <menuitem label="&exportView;" accesskey="&export.ak;" command="smc-exportView"/>
  233.           </menupopup>
  234.         </menu> 
  235.         <menu id="menu-trigger" label="&menu.trigger;" accesskey="&menu.trigger.ak;">
  236.           <menupopup>
  237.             <menuitem label="&createTrigger;" accesskey="&create.ak;" command="smc-createTrigger"/>
  238.             <menuitem label="&dropTrigger;" accesskey="&drop.ak;" command="smc-dropTrigger"/>
  239.             <menuseparator/>
  240.             <menuitem label="&renameTrigger;" accesskey="&rename.ak;" command="smc-renameTrigger"/>
  241.           </menupopup>
  242.         </menu> 
  243.         <menu id="menu-tools" label="&menu.tools;" accesskey="&menu.tools.ak;">
  244.           <menupopup id="sm_menu_tools_popup">
  245.           <menuitem label="&mi.options;" accesskey="&mi.options.ak;" command="smc-options"/>
  246.           <!-- Issue #149: default state of the following menuitem should be unchecked -->
  247.           <menuitem id="menu-general-sharedPagerCache" label="&mi.sharedPagerCache;"  accesskey="&mi.sharedPagerCache.ak;" type="checkbox"/>
  248.           <menuitem id="menu-general-extensionTable" type="checkbox" label="&mi.extensionTable;" accesskey="&mi.extensionTable.ak;" oncommand="SQLiteManager.useExtensionManagementTable(this.hasAttribute('checked'),false);" observes="bc-dbOpen"/>
  249.  
  250.             <menuitem id="experiment" label="Experiment" oncommand="SQLiteManager.experiment()"/>
  251.           </menupopup>
  252.         </menu>
  253.         <menu id="menu-help" label="&menu.help;">
  254.           <menupopup>
  255.             <menuitem label="&menu.help.reportProblem;" accesskey="&menu.help.reportProblem.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.issueNew)"/>
  256.             <menuitem label="&menu.help.faq;" accesskey="&menu.help.faq.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.faq)"/>
  257.             <menuseparator/>
  258.             <menuitem label="&menu.help.sqlitehome;" accesskey="&menu.help.sqlitehome.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.sqliteHome)"/>
  259.             <menuitem label="&menu.help.sqlitesyntax;" accesskey="&menu.help.sqlitesyntax.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.sqliteLang)"/>
  260.             <menuseparator/>
  261.             <menuitem label="&menu.help.extensionhome;" accesskey="&menu.help.extensionhome.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.home)"/>
  262.             <menuitem label="&menu.help.aboutextension;" accesskey="&menu.help.aboutextension.ak;" oncommand="window.openDialog(SmGlobals.chromes.aboutSM,'about','chrome, centerscreen, modal, dialog');"/>
  263.           </menupopup>
  264.         </menu>
  265.         <spacer flex="1"/>
  266.        </menubar>
  267.       <!-- this hbox holds all main toolbars. --> 
  268.       <hbox id="hbox-main-toolbar">
  269.       <!-- each toolbar must end with a toolbarseparator to allow dynamic  arrangement of toolbars without spoiling the display-->
  270.       <toolbar id="sm-toolbar-refresh">
  271.         <toolbarbutton id="tbb_refresh" command="smc-refresh"/>
  272.         <toolbarbutton id="tbb_options" command="smc-options"/>
  273.         <toolbarseparator/>
  274.       </toolbar>
  275.  
  276.       <toolbar id="sm-toolbar-database">
  277.         <toolbarbutton id="tbb_newDb" command="smc-newDb"/>
  278.         <toolbarbutton id="tbb_openDb" command="smc-openDb"/>
  279.         <toolbarbutton id="tbb_import" command="smc-import"/>
  280.         <toolbarbutton id="tbb_udf" command="smc-udf"/>
  281.         <toolbarseparator/>
  282.       </toolbar>
  283.  
  284.       <toolbar id="sm-toolbar-table">
  285.         <toolbarbutton id="tbb_createTable" command="smc-createTable"/>
  286.         <toolbarbutton id="tbb_dropTable" command="smc-dropTable"/>
  287.         <toolbarbutton id="tbb_modifyTable" command="smc-modifyTable"/>
  288.         <toolbarseparator/>
  289.       </toolbar>
  290.       <toolbar id="sm-toolbar-index">
  291.         <toolbarbutton id="tbb_createIndex" command="smc-createIndex"/>
  292.         <toolbarbutton id="tbb_dropIndex" command="smc-dropIndex"/>
  293.         <toolbarseparator/>
  294.       </toolbar>
  295.  
  296.       <toolbar id="sm-toolbar-profileDB">
  297.         <menu id="menu-DbList" label="&dir;" tooltiptext="&dir;">
  298.           <menupopup>
  299.           <menuitem label="&profileDir;" type="radio" name="menu-defaultDir" checked="true" oncommand="SQLiteManager.populateDBList('profile');"/>
  300.           <menuitem label="&userDir;" type="radio" name="menu-defaultDir" oncommand="SQLiteManager.populateDBList('user');"/>
  301.           <menuseparator/>
  302.           <menuitem label="&selectUserDir;" oncommand="SQLiteManager.selectDefaultDir();"/>
  303.           </menupopup>
  304.         </menu>
  305.         <menulist id="listbox-profileDB" style="max-width: 25ex" sizetopopup="always" dirType="profile">
  306.           <menupopup>
  307.             <menuitem label="&profile.dblist.select;" selected="true"/>
  308.           </menupopup>
  309.         </menulist>
  310.         <toolbarbutton label="&profile.dblist.buttonlabel;" tooltiptext="&profile.dblist.buttonlabel;" oncommand="SQLiteManager.openSelectedDatabase('listbox-profileDB')" />
  311.         <toolbarseparator/>
  312.       </toolbar>
  313.  
  314.       <toolbar id="sm-toolbar-debug" hidden="true">
  315.         <toolbarbutton id="tbb_aboutConfig" command="smc-aboutconfig"/>
  316.         <toolbarbutton id="tbb_console" command="smc-console"/>
  317.         <toolbarbutton id="tbb_dominspector" command="smc-dominspector" hidden="true"/>
  318.         <toolbarseparator/>
  319.       </toolbar>
  320.  
  321.       <!-- required to let the toolbar occupy the whole width flex=1 is necessary. -->
  322.       <toolbar id="sm-toolbar-spacer" flex="1"/>
  323.       </hbox>
  324.     </toolbox>
  325.  
  326.   <hbox flex="1">
  327.     <vbox id="sidebar-left" flex="1" persist="width">
  328.       <menulist id="ml-dbNames" style="font-weight: bold;  color: blue; padding: 3px 3px;" context="mp-detachDb" oncommand="SQLiteManager.changeAttachedDb();"/>
  329.       <tree id="t-dbStructNorm" flex="1" hidecolumnpicker="true" seltype="single" selstyle="primary" onselect="SQLiteManager.getDbObjectInfo()">
  330.         <treecols>
  331.           <!-- primary=true required to put +/- sign for hierarchical tree -->
  332.           <treecol id="col-dbStructNorm" hideheader="true" primary="true" flex="1"/>
  333.         </treecols>
  334.           <treechildren id="tc-dbStructNorm" context="mp-dbstructure"/>  
  335.       </tree>
  336.     </vbox>
  337.  
  338.     <splitter id="localsplitter" persist="state" collapse="before">
  339.       <grippy/>
  340.     </splitter>
  341.  
  342.     <vbox flex="1" persist="width">
  343.     <tabbox id="sm-tabbox" flex="1">
  344.       <tabs id="sm-tabs" onselect="SQLiteManager.loadTabWithId(this.selectedItem.id)" closebutton="false" onclosetab="SQLiteManager.closeTab()">
  345.         <tab id="tab-structure" linkedpanel="structureTab" label="&tab.structure;"  persist="selected"/>
  346.         <tab id="tab-browse" linkedpanel="browseTab" label="&tab.browse;" persist="selected"/>
  347.         <tab id="tab-execute" linkedpanel="executeTab" label="&tab.execute;"  persist="selected"/>
  348.         <tab id="tab-dbinfo" linkedpanel="dbInfoTab" label="&tab.dbinfo;" persist="selected"/>
  349.         <tab id="tab-exim" linkedpanel="eximTabpanel" collapsed="true"/>
  350.         <tab id="tab-udf" linkedpanel="udfTabpanel" label="&tab.udf;" collapsed="true"/>
  351.       </tabs>
  352.  
  353.       <tabpanels id="sm-tabpanels" flex="1">
  354.         <tabpanel id="structureTab" flex="1">
  355.         <vbox id="vb-structureTab" flex="1">
  356.           <groupbox>
  357.           <caption id="cap-object-info"/>
  358.           <deck id="d-master-ops" hidden="true">
  359.           <hbox id="gb-master-ops-master">
  360.             <button label="&export;" command="smc-exportTable"/>
  361.           </hbox>
  362.           <hbox id="gb-master-ops-table">
  363.             <button label="&drop;" command="smc-dropTable"/>
  364.             <button label="∅" command="smc-emptyTable"/>
  365.             <button label="&rename;" command="smc-renameTable"/>
  366.             <button label="&reindex;" command="smc-reindexTable"/>
  367.             <button label="©" command="smc-copyTable"/>
  368.             <button label="&export;" command="smc-exportTable"/>
  369.             <button label="FK" id="btn-foreign-key" oncommand="SQLiteManager.generateFKTriggers()"/>
  370.           </hbox>
  371.           <hbox id="gb-master-ops-view">
  372.             <button label="&drop;" command="smc-dropView"/>
  373.             <button label="&rename;" command="smc-renameView"/>
  374.             <button label="&modify;" command="smc-modifyView"/>
  375.             <button label="&export;" command="smc-exportView"/>
  376.           </hbox>
  377.           <hbox id="gb-master-ops-index">
  378.             <button label="&drop;" command="smc-dropIndex"/>
  379.             <button label="&reindex;" command="smc-reindexIndex"/>
  380.           </hbox>
  381.           <hbox id="gb-master-ops-trigger">
  382.             <button label="&drop;" command="smc-dropTrigger"/>
  383.             <button label="&rename;" command="smc-renameTrigger"/>
  384.           </hbox>
  385.           </deck>
  386.           </groupbox>
  387.           <vbox flex="1" style="overflow:auto">
  388.           <groupbox id="gb-master-info" hidden="true">
  389.           <caption label="&masterinfo.sql;"/>
  390.           <description id="desc-sql" style="white-space: pre-wrap;"  tooltiptext="Double-click to copy the SQL statement" ondblclick="SQLiteManager.copyText(this.textContent);" hidden="true"/>
  391.           <textbox id="str-sql" multiline="true" rows="1" align="stretch" style="overflow: auto" readonly="true"/>
  392.           </groupbox>
  393.           <deck id="d-more-info" hidden="true">
  394.           <vbox id="gb-more-info-table" flex="1">
  395.           <groupbox>
  396.           <caption label="&moreInfo;"/>
  397.  
  398.           <hbox>
  399.             <label class="forControl" value="&numRecords;:"/>
  400.             <textbox id="numRecords" style="width: 8ex" readonly="true"/>
  401.             <label class="forControl" value="&numIndexes;:"/>
  402.             <textbox id="numIndexes" style="width: 8ex" readonly="true"/>
  403.             <label class="forControl" value="&numTriggers;:"/>
  404.             <textbox id="numTriggers" style="width: 8ex" readonly="true"/>
  405.           </hbox>
  406.           </groupbox>
  407.           <groupbox id="gb-editColumn" hidden="true">
  408.           <caption label="&menu.editColumn;"/>
  409.             <grid>
  410.               <columns>
  411.                 <column style="padding: 1px 5px; width: 100px;"/>
  412.                 <column style="padding: 1px 5px; width: 200px;"/>
  413.                 <column style="padding: 1px 5px; width: 200px;"/>
  414.                 <column style="padding: 1px 5px; width: 200px;"/>
  415.               </columns>
  416.               <rows>
  417.                 <row align="center">
  418.                   <text value=""/>
  419.                   <text value="Column Name"/>
  420.                   <text value="Column Type"/>
  421.                   <text value="Default Value"/>
  422.                 </row>
  423.                 <row align="center">
  424.                   <text value="Old values"/>
  425.                   <textbox id="tb-ec-oldName" readonly="true"/>
  426.                   <textbox id="tb-ec-oldType" readonly="true"/>
  427.                   <textbox id="tb-ec-oldDefault" readonly="true"/>
  428.                 </row>
  429.                 <row align="center">
  430.                   <text value="New values"/>
  431.                   <textbox id="tb-ec-newName"/>
  432.                   <textbox id="tb-ec-newType"/>
  433.                   <textbox id="tb-ec-newDefault"/>
  434.                 </row>
  435.                 <row align="center">
  436.                   <text value=""/>
  437.                   <text value=""/>
  438.                   <hbox>
  439.                   <text id="tb-ec-table" hidden="true"/>
  440.                   <button label="Cancel" oncommand="SQLiteManager.cancelEditColumn()"/>
  441.                   <button label="Change" oncommand="SQLiteManager.alterColumn()"/>
  442.                   </hbox>
  443.                   <text value=""/>
  444.                 </row>
  445.               </rows>
  446.             </grid>
  447.           </groupbox>
  448.           <groupbox>
  449.           <caption id="capColumns" labelPrefix="&Columns;"/>
  450.   <tree id="treeTabCols" rows="6" seltype="single" smTableName="" onselect="">
  451.       <treecols>
  452.         <treecol id="cCid" label="Column ID" flex="1" persist="width"/>
  453.         <splitter class="tree-splitter"/>
  454.         <treecol id="cName" label="Name" flex="1" persist="width"/>
  455.         <splitter class="tree-splitter"/>
  456.         <treecol id="cType" label="Type" flex="1" persist="width"/>
  457.         <splitter class="tree-splitter"/>
  458.         <treecol id="cNotnull" label="Not Null" flex="1" persist="width"/>
  459.         <splitter class="tree-splitter"/>
  460.         <treecol id="cDflt_value" label="Default Value" flex="1" persist="width"/>
  461.         <splitter class="tree-splitter"/>
  462.         <treecol id="cPk" label="Primary Key" flex="1" persist="width"/>
  463.       </treecols>
  464.           <treechildren id="smTableColumns" context="mp-opTableColumn">
  465.           </treechildren>
  466.   </tree>
  467.           <vbox id="hb-addcol">
  468.           <hbox>
  469.             <label style="width:24ex;" value="&name;"/>
  470.             <label style="width:15ex;" value="&type;"/>
  471.             <label style="width:6ex;" value="¬Null;"/>
  472.             <label style="width:10ex;" value="&default;"/>
  473.           </hbox>
  474.           <hbox>
  475.           <textbox id="tb-addcol-name" style="width:24ex"/>
  476.           <menulist id="tb-addcol-type" style="width:15ex" editable="true"  sizetopopup="none">
  477.             <menupopup>
  478.               <menuitem label="" selected="true"/>
  479.               <menuitem label="INTEGER" />
  480.               <menuitem label="BOOL" />
  481.               <menuitem label="REAL" />
  482.               <menuitem label="DOUBLE" />
  483.               <menuitem label="FLOAT" />
  484.               <menuitem label="CHAR" />
  485.               <menuitem label="TEXT" />
  486.               <menuitem label="VARCHAR" />
  487.               <menuitem label="BLOB" />
  488.               <menuitem label="NUMERIC" />
  489.               <menuitem label="DATETIME" />
  490.             </menupopup>
  491.           </menulist>
  492.         <checkbox id="tb-addcol-notnull" style="width:7ex"  value=""/>
  493.           <textbox id="tb-addcol-default" style="width:10ex"/>
  494.           <button id="btn-addcol" label="&btn.addcol;" oncommand="SQLiteManager.operateOnTable('addColumn')"/>
  495.           </hbox>
  496.           </vbox>
  497.           </groupbox>
  498.           </vbox>
  499.           <groupbox id="gb-more-info-view"/>
  500.           <vbox id="gb-more-info-index">
  501.             <groupbox>
  502.             <caption label="&indexProp;"/>
  503.           
  504.             <hbox>
  505.               <label class="forControl" value="&indexedTable;:"/>
  506.               <textbox id="tabletoindex" style="width: 25ex" readonly="true"/>
  507.               <label class="forControl" value="&indexDuplicate;:"/>
  508.               <textbox id="duplicatevalues" style="width: 25ex" readonly="true"/>
  509.             </hbox>
  510.             </groupbox>
  511.           <groupbox>
  512.           <caption label="&indexedFields;"/>
  513.   <tree id="treeIdxCols" rows="4" seltype="single">
  514.       <treecols>
  515.         <treecol id="ciSeqno" label="Seq. No." flex="1" persist="width"/>
  516.         <splitter class="tree-splitter"/>
  517.         <treecol id="ciCid" label="Column ID" flex="1" persist="width"/>
  518.         <splitter class="tree-splitter"/>
  519.         <treecol id="ciName" label="Name" flex="1" persist="width"/>
  520.       </treecols>
  521.           <treechildren id="smIndexColumns">
  522.           </treechildren>
  523.   </tree>
  524.             </groupbox>
  525.           </vbox>
  526.           <groupbox id="gb-more-info-trigger"/>
  527.           </deck>
  528.           </vbox>
  529.           </vbox>
  530.         </tabpanel>
  531.         <tabpanel id="browseTab" flex="1">
  532.           <vbox id="vb-browseTab" flex="1">
  533.             <hbox align="center" id="optionbar" style="min-height: 1.4em">
  534.               <label id="browse-type" accesskey="" value="" persist="value"/>
  535.               <textbox id="browse-name" value="" persist="value" readonly="true" width="80"/>
  536.               <button id="btnSearch" command="smc-search"/>
  537.               <button id="btnShowAll"  command="smc-showAll"/>
  538.               <spacer flex="1"/>
  539.               <button id="btnAddRecord" label="&btn.addrecord;" tooltiptext="&btn.addrecord;" accesskey="&btn.addrecord.ak;" oncommand="SQLiteManager.operateOnTable('insert')"/>
  540.               <button id="btnAddDupRecord" label="&menu.duplicateRecord;" tooltiptext="&menu.duplicateRecord;" accesskey="&menu.duplicateRecord.ak;" oncommand="SQLiteManager.operateOnTable('duplicate')"/>
  541.               <button id="btnEditRecord" label="&menu.editSelected;" tooltiptext="&menu.editSelected;" accesskey="&menu.editSelected.ak;" oncommand="SQLiteManager.operateOnTable('update')" />
  542.               <button id="btnDeleteRecord" label="&menu.deleteSelected;" tooltiptext="&menu.deleteSelected;"  accesskey="&menu.deleteSelected.ak;" oncommand="SQLiteManager.operateOnTable('delete')" />
  543.             </hbox>
  544. <!-- trial for sliding forms -->
  545.             <vbox flex="1">
  546.             <vbox id="box-rowedit" flex="1" hidden="true" style="overflow: auto"/>
  547.             <tree id="browse-tree" style="min-height:20em" editable="true"  flex="1" seltype="multiple" enableColumnDrag="false">
  548.               <treecols hidden="true"/>
  549.               <treechildren id="browse-treechildren" editable="true" hidden="true" flex="1" context="mp-editTableRow" onclick="treeBrowse.UserTreeClick(event)"/>
  550.             </tree>
  551.             </vbox>
  552.             <hbox id="browse-navigate">
  553.               <button id="btn-nav-first" label="<<" tooltiptext="&first;" oncommand="SQLiteManager.onBrowseNavigate('first')"/>
  554.               <button id="btn-nav-previous" label="<" tooltiptext="&previous;" oncommand="SQLiteManager.onBrowseNavigate('previous')"/>
  555.               <label id="nav-start-val" style="padding-top:5px;font-weight:bold;"/>
  556. <!--
  557.               <textbox id="nav-start-val" style="width:50px"/>
  558. -->
  559.               <label value="&to;" style="padding-top:5px"/>
  560.               <label id="nav-end-val" style="padding-top:5px;font-weight:bold;"/>
  561. <!--
  562.               <textbox id="nav-end-val" style="width:50px"/>
  563. -->
  564.               <label value="&of;" style="padding-top:5px"/>
  565.               <label id="nav-total-val" style="padding-top:5px;font-weight:bold;"/>
  566. <!--
  567.               <textbox id="nav-total-val" readonly="true" style="width:50px"/>
  568. -->
  569.               <button id="btn-nav-next" label=">" tooltiptext="&next;" oncommand="SQLiteManager.onBrowseNavigate('next')"/>
  570.               <button id="btn-nav-last" label=">>" tooltiptext="&last;" oncommand="SQLiteManager.onBrowseNavigate('last')"/>
  571.             </hbox>
  572.           </vbox>
  573.         </tabpanel>
  574.  
  575.         <tabpanel id="executeTab" flex="1">
  576.           <vbox id="vb-executeTab" flex="1">
  577.             <hbox>
  578.             <label style="font-size:10pt;" value="&string.enterSql;" accesskey="&string.enterSql.ak;" control="txtSqlStatement"/>
  579.             <hbox id="hb-queryHistory">
  580.              <image id="queryHistoryPrevImage" hidden="true" tooltiptext="&btn.prevSql;" onclick="SQLiteManager.showPrevSql()"/>
  581.             <image id="queryHistoryNextImage" hidden="true" tooltiptext="&btn.nextSql;" onclick="SQLiteManager.showNextSql()"/>
  582.             <image id="querySaveByNameImage" hidden="true" tooltiptext="&btn.saveQuery;" onclick="SQLiteManager.saveSqlByName()"/>
  583.             <image id="queryHistoryClearImage" hidden="true" tooltiptext="&btn.clearHistory;" onclick="SQLiteManager.clearSqlHistory()"/>
  584.             </hbox>
  585.   
  586.             <spacer flex="1"/>
  587.             <toolbox id="tb-sql-helper">
  588.               <!-- comes from menuSqlHelper.xul overlay -->
  589.               <menubar id="sql-help-menubar"/>
  590.             </toolbox>
  591.             </hbox>
  592.   
  593.             <vbox style="min-height:5em">
  594.             <textbox id="txtSqlStatement" multiline="true" rows="2" flex="1" value="SELECT * FROM tablename" />
  595.  
  596.             <hbox flex="0">
  597.             <menulist id="listbox-queries" hidden="true" style="max-width: 25ex" sizetopopup="always" oncommand="SQLiteManager.onSelectQuery();">
  598.               <menupopup/>
  599.             </menulist>
  600.             <button id="buttonRun" command="smc-runQuery" label="&btn.runsql;" accesskey="&btn.runsql.ak;" tooltiptext="&btn.runsql.tooltiptext;"/>
  601.   <!--
  602.             <button id="buttonRun" label="&buttonRun;" accesskey="&buttonRun.ak;" oncommand="SQLiteManager.runSqlStatement('select')" />
  603.             <button id="buttonExecute" label="&buttonExecute;" accesskey="&buttonExecute.ak;" oncommand="SQLiteManager.runSqlStatement('execute')" />
  604.   -->
  605.             <label class="forControl" value="&label.sqlLastError;:"/>
  606.             <textbox id="sqlLastError" readonly="true" flex="1"/>
  607.             </hbox>
  608.             </vbox>
  609.             <splitter id="executetabsplitter" persist="state" collapse="before"/>
  610.  
  611.             <hbox flex="1">
  612.               <tree align="stretch" id="treeSqlOutput" style="min-height:10em" enableColumnDrag="true" seltype="multiple" flex="1">
  613.                 <treecols hidden="true"/>
  614.                 <treechildren hidden="true" flex="1" onclick="treeExecute.UserTreeClick(event)" context="mp-copy"/>  
  615.               </tree>
  616.             </hbox>
  617.           </vbox>
  618.         </tabpanel>
  619.  
  620.         <tabpanel id="dbInfoTab"/>
  621.         <tabpanel id="eximTabpanel"/>
  622.         <tabpanel id="udfTabpanel"/>
  623.       </tabpanels>
  624.     </tabbox>
  625.     </vbox>
  626.     </hbox>
  627.     </vbox>
  628.  
  629.     <statusbar id="sbFull">
  630.       <statusbarpanel id="sbSqliteVersion" style="font-weight:bold"/>
  631.       <statusbarpanel id="sbGeckoVersion"/>
  632.       <statusbarpanel id="sbExtVersion" style="color:#666666"/>
  633.       <statusbarpanel id="sbSharedMode" label="---" style="font-weight:bold;"/>
  634.       <statusbarpanel id="sbPanel-display" flex="1"/>
  635.       <statusbarpanel id="sbQueryTime"/>
  636.     </statusbar>  
  637.  
  638. <!-- for cloning; hidden=true otherwise awkward space at the bottom-->
  639. <menuitem id="mi-mru" crop="center" oncommand="SQLiteManager.openDatabaseWithPath(this.label)" hidden="true"/>
  640. </window>
  641.